Conversation
…Implementation Implements full ESPI 4.0 customer.xsd compliance for ServiceLocation including Location inheritance (type → mainAddress → phone1/phone2 → status → positionPoints) and ServiceLocation fields (accessMethod → usagePointHrefs → outageBlock). ## Entity Changes - ServiceLocationEntity: Added status.remark @AttributeOverride, usagePointHrefs collection - ServiceLocationEntity: Replaced PhoneNumberEntity with embedded TelephoneNumber (8 fields) - Organisation: Created TelephoneNumber @embeddable with all 8 customer.xsd fields - PhoneNumberEntity: Marked @deprecated (retained for backward compatibility) ## DTO Changes - ServiceLocationDto: Complete refactor to match customer.xsd ServiceLocation → WorkLocation → Location - ServiceLocationDto: Added all Location fields (type, addresses, phone1/phone2, electronicAddress, geoInfoReference, direction, status, positionPoints) - ServiceLocationDto: Added all ServiceLocation fields (accessMethod, siteAccessProblem, needsInspection, usagePointHrefs, outageBlock) - CustomerDto: Renamed PhoneNumberDto → TelephoneNumberDto with 8 fields - StatusDto: Created shared top-level DTO for Status type (value, dateTime, remark, reason) - CustomerDto: Removed nested StatusDto class (uses shared StatusDto) ## Mapper Changes - ServiceLocationMapper: Created complete bidirectional Entity ↔ DTO mapper - CustomerMapper: Updated for 8-field TelephoneNumber - DtoExportServiceImpl: Added StatusDto to JAXBContext initialization ## Repository/Service Changes - ServiceLocationRepository: Removed 5 non-indexed query methods for performance - ServiceLocationService/Impl: Removed corresponding service methods ## Database Migration - V3__Create_additiional_Base_Tables.sql: Added status_remark column - V3__Create_additiional_Base_Tables.sql: Added 16 phone columns (phone1_*, phone2_*) - V3__Create_additiional_Base_Tables.sql: Created service_location_usage_point_hrefs table ## Test Changes - ServiceLocationDtoTest: Created comprehensive 6-test suite for XML marshalling - ServiceLocationRepositoryTest: Removed tests for deleted query methods - CustomerDtoTest/MarshallingTest: Updated for 8-field TelephoneNumber and shared StatusDto - All XML assertion tests: Updated to chain assertions and handle self-closing tags ## JAXB Fixes - Resolved "Two classes have same XML type name Status" IllegalAnnotationsException - Created shared StatusDto to eliminate duplicate nested classes - Fixed JAXBContext initialization to include shared StatusDto ## Test Results - All 636 tests pass (0 failures, 0 errors) - Integration tests pass - Full CI/CD verification complete ## Schema Compliance - ServiceLocation per customer.xsd lines 1218-1280 - Location per customer.xsd lines 914-997 - TelephoneNumber per customer.xsd lines 1428-1478 - Status per customer.xsd lines 1254-1280 Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Phase 23: ServiceLocation ESPI 4.0 Schema Compliance - Complete Implementation
Implements full ESPI 4.0 customer.xsd compliance for ServiceLocation including Location inheritance (type → mainAddress → phone1/phone2 → status → positionPoints) and ServiceLocation fields (accessMethod → usagePointHrefs → outageBlock).
Summary of Changes
Entity Layer:
status.remarkfield with @AttributeOverride to ServiceLocationEntityusagePointHrefscollection for cross-stream UsagePoint referencesDTO Layer:
Mapper Layer:
Repository/Service:
Database Migration:
status_remarkcolumn to service_locations tableservice_location_usage_point_hrefsjoin tableTests:
Schema Compliance
Test Results
Files Changed
Breaking Changes
None - backward compatible. PhoneNumberEntity marked @deprecated but retained.
Related Issue
Part of #28 - ESPI 4.0 Schema Compliance Implementation
Checklist
Co-Authored-By: Claude Sonnet 4.5 noreply@anthropic.com